
package com.server;

import com.domain.DoorRecord;
import com.repository.RecordRepo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class RecordServer {
 @Resource
    public RecordRepo findCountByTimerecordRepory;


/*    public void updateModel(DoorCar car){
       carRepo.updateByName(model,department);
        carRepo.save(car);
        carRepo.findAll();
    }*/
    public void save(DoorRecord doorRecord){

        findCountByTimerecordRepory.save(doorRecord);
    }
    public Long findCountByTime(String cardno,String note1,String time){
        System.out.println("cardno"+cardno+"note1"+note1+"time"+time);
        Long a=findCountByTimerecordRepory.countByTimeLikeAndCardnoAndNote1("%"+time+"%",cardno,note1);
        System.out.println("aaaaaaaaaaaaaaaaaaaaaa");
        return a;
    }
}

